import util from '../libs/util';
var qs = require('qs');

//规则列表
export function get_all_rule(value) {
    return util.ajax({
        // url: BASE_URL1+'/kb/v1/rule/salary/config/',
        url: BASE_URL1+'/kb/v1/rule/salary/config/',
        method: 'get',
        data:value,
        headers: {
            "Content-Type": "application/json; charset=UTF-8",
        }
    })
}
//新增 规则
export function get_add_rule(value) {
    return util.ajax({
        url: BASE_URL1+'/kb/v1/rule/salary/config/',
        // url: BASE_URL1+'/kb/v1/rule/salary/config/',
        method: 'post',
        // data:qs.stringify(value),
        data:value,
        headers: {
            "Content-Type": "application/json; charset=UTF-8",
        }
    })
}
//获取可以添加的 规则
export function get_rule_list(value) {
    return util.ajax({
        url: BASE_URL1+'/kb/v1/rule/salary/template/',
        // url: 'http://192.168.0.130:8180/kb/v1/rule/salary/template/',
        method: 'get',
        data:value,
        headers: {
            "Content-Type": "application/json; charset=UTF-8",
        }
    })
}
//删除规则
export function del_rule(value) {
    return util.ajax({
        url: BASE_URL1+'/kb/v1/rule/salary/config/',
        // url: 'http://192.168.0.113:8180/kb/v1/rule/salary/config/',
        method: 'delete',
        data:qs.stringify(value),
        // headers: {
        //     "Content-Type": "application/json; charset=UTF-8",
        // }
    })
}
//查询增部奖
export function zengburule(value) {
    return util.ajax({
        url: BASE_URL1+'/kb/v1/salaryruledemo/AddDeptAllowanceDto',
        // url: 'http://192.168.0.113:8180/kb/v1/rule/salary/config/',
        method: 'get',
        data:value,
        headers: {
            "Content-Type": "application/json; charset=UTF-8",
        }
    })
}
//获取职级列表
export function get_rank(value) {
    return util.ajax({
        url: BASE_URL1+'/kb/v1/rank/',
        method: 'get',
        data:value,
        headers: {
            "Content-Type": "application/json; charset=UTF-8",
        }
    })
}
//创建营销职级
export function add_rank(value) {
    return util.ajax({
        url: BASE_URL1+'/kb/v1/rank/',
        method: 'post',
        data:value,
        headers: {
            "Content-Type": "application/json; charset=UTF-8",
        }
    })
}
//删除职级
export function del_rank(value) {
    return util.ajax({
        url: BASE_URL1+'/kb/v1/rank/',
        method: 'delete',
        data:value,
        headers: {
            "Content-Type": "application/json; charset=UTF-8",
        }
    })
}
//修改职级之后提交
export function update_rank(value) {
    return util.ajax({
        url: BASE_URL1+'/kb/v1/rank/',
        method: 'post',
        data:qs.stringify(value),
    })
}

//查询人力奖数据结构
export function renli(value) {
    return util.ajax({
        url: BASE_URL1+'/kb/v1/salaryruledemo/humanDto',
        // url: BASE_URL1+'/kb/v1/rule/salary/config/',
        method: 'get',
        data:value,
        headers: {
            "Content-Type": "application/json; charset=UTF-8",
        }
    })
}

//查询分红奖规则数据结构
export function fenhong(value) {
    return util.ajax({
        url: BASE_URL1+'/kb/v1/salaryruledemo/ShareOutBonusAwardDto',
        // url: BASE_URL1+'/kb/v1/rule/salary/config/',
        method: 'get',
        data:value,
        headers: {
            "Content-Type": "application/json; charset=UTF-8",
        }
    })
}

//查询销售奖规则数据结构
export function xiaoshou(value) {
    return util.ajax({
        url: BASE_URL1+'/kb/v1/salaryruledemo/SalesAwardDto',
        // url: 'http://192.168.0.113:8180/kb/v1/rule/salary/config/',
        method: 'get',
        data:value,
        headers: {
            "Content-Type": "application/json; charset=UTF-8",
        }
    })
}

//查询责任底薪规则数据结构
export function dixin(value) {
    return util.ajax({
        url: BASE_URL1+'/kb/v1/salaryruledemo/ResponsibilityBaseSalaryDto',
        // url: 'http://192.168.0.113:8180/kb/v1/rule/salary/config/',
        method: 'get',
        data:value,
        headers: {
            "Content-Type": "application/json; charset=UTF-8",
        }
    })
}

//查询续佣规则数据结构
export function xuyong(value) {
    return util.ajax({
        url: BASE_URL1+'/kb/v1/salaryruledemo/RenewalYearCommisionDto',
        // url: 'http://192.168.0.113:8180/kb/v1/rule/salary/config/',
        method: 'get',
        data:value,
        headers: {
            "Content-Type": "application/json; charset=UTF-8",
        }
    })
}

//查询职级奖规则数据结构
export function zhijirule(value) {
    return util.ajax({
        url: BASE_URL1+'/kb/v1/salaryruledemo/RankPrizeDto',
        // url: 'http://192.168.0.113:8180/kb/v1/rule/salary/config/',
        method: 'get',
        data:value,
        headers: {
            "Content-Type": "application/json; charset=UTF-8",
        }
    })
}


//查询成长津贴规则数据结构
export function chengzhang(value) {
    return util.ajax({
        url: BASE_URL1+'/kb/v1/salaryruledemo/GrowthAllowanceDto',
        // url: 'http://192.168.0.113:8180/kb/v1/rule/salary/config/',
        method: 'get',
        data:value,
        headers: {
            "Content-Type": "application/json; charset=UTF-8",
        }
    })
}

//查询育成奖规则数据结构
export function yucheng(value) {
    return util.ajax({
        url: BASE_URL1+'/kb/v1/salaryruledemo/GroupUpDto',
        // url: 'http://192.168.0.113:8180/kb/v1/rule/salary/config/',
        method: 'get',
        data:value,
        headers: {
            "Content-Type": "application/json; charset=UTF-8",
        }
    })
}

//考核晋升管理--->考核指标
export function get_indicators(value) {
    return util.ajax({
        url: BASE_URL1+'/kb/v1/rule/assess/template/',
        // url: 'http://192.168.0.113:8180/kb/v1/rule/salary/config/',
        method: 'get',
        data:value,
        headers: {
            "Content-Type": "application/json; charset=UTF-8",
        }
    })
}
// 
//考核晋升管理--->维持设置创建add
export function add_weichi(value) {
    return util.ajax({
        url: BASE_URL1+'/kb/v1/rule/assess/down/config/',
        // url: 'http://192.168.0.113:8180/kb/v1/rule/salary/config/',
        method: 'post',
        data:qs.stringify(value),
    })
}